<script>
export default {
  name: "CheckBox",
  props: {
    checked: {
      type: Boolean,
      default: false,
    },
  },
};
</script>

<template>
  <view class="checkbox">
    <image
      class="selectBox"
      v-if="checked"
      :src="'https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/选中.svg'"
    />
    <image
      class="selectBox"
      v-else
      src="https://llyz.oss-cn-beijing.aliyuncs.com/diagnostic-report-h5/未选中.svg"
    />
    <slot></slot>&nbsp;&nbsp;
  </view>
</template>

<style scoped>
.checkbox {
  display: inline;
  vertical-align: middle;
  line-height: 21px;
}

.selectBox {
  width: 13px;
  height: 13px;
  padding-right: 1px;
  position: relative;
  top: 1px;
}
</style>
